const arr=[1,2,3,4]

const [first,secend,...rest]=arr;
console.log(rest)